{extend name="$index_style_layout" /}

<!--SEO相关-->
{block name="head_title"}{$info.title}{/block}
{block name="head_keword"}{$info.keywords?:$info.title}  {$s_info.name} {/block}
{block name="head_description"}{:get_word(del_html($info['content']),300)}{/block}

{block name="body_content"}
<link rel="stylesheet" href="__STATIC__/index/default/showpic.css">

<script type="text/javascript">
function add_fav(id){
	var url="{:purl('fav/api/add')}?type={:config('system_dirname')}&id="+id;
	$.get(url,function(res){
		if(res.code==0){
			layer.msg('收藏成功');
		}else{
			layer.alert(res.msg);
		}
	})
}
</script>
<style>.infos{font-size:14px;color:#999;}.infos span{margin-right:10px;}</style>
	<div class="ContentBox">
		<div class="title">{$info.title}</div>
		<div class="infos">
			<span><i class="glyphicon glyphicon-time"></i> {:date("Y-m-d H:i:s",$info.create_time)}</span>
			<span><i class="si si-eye"></i> {$info.view}</span>
			<span onclick="add_fav({$id})"> <li class="fa fa-fw fa-heart"></li>收藏</span> 
			<span class="manage_topic"> <li class="fa fa-cogs"></li> 管理</span> 
			{include file="index@common/manage_btn" /}
		</div>
		<div class="Cont">
			<i class="glyphicon glyphicon-paperclip"></i>
			{$info.content}
		</div>
	</div>

<style>
	#goods-list-container {
		margin: 0;
		padding-left: 3%;
		padding-right: 3%;
	}
	#goods-list-container>ul>li {
		width: 48%;
		float: left;
		border: solid 1px #ddd;
		margin: 20px 0;
		position: relative;
	}
	#goods-list-container>ul>li:nth-child(2n) {
		float: right;
	}
	.crossline {
		text-decoration-line: line-through;
		text-decoration-color: red;
	}
	.text-large {
		font-size: 120%;
	}
	.currency-rmb:before {
		content: '￥';
	}

	.good-imgbox {
		padding: 20px;
		overflow: hidden;
		margin: 0 auto;
	}
	.good-imgbox > img {
		width: 100%;
		height: 100%;
	}
	.good-texture {
		line-height: 1.5em;
		height: 3em;
		position: relative;
		padding: 0 0 0 20px;

		/* .dhidden2 */
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		word-break: break-all;
	}
	.good-priceinfo {
		height: 2em;
		line-height: 2em;
		padding: 0 0 0 20px;
		margin-bottom: 20px;
	}
	.prom-price {
		color: #f12828;
		font-weight: bold;
		display: inline-block;
	}
</style>

	<div class="BaseInfos" id="goods-list-container">

	</div>
	<script>
		$(function(){

			let $container = $("#goods-list-container");

			$.get("/cms/api/searchGoods", {
				keyword: "短裙",
				page: 1,
				pageSize: 20
			}, (data) => {
				console.log(data);
				if (data.code !== 0) {
					alert(data.message);
					return;
				}

				let $ul = $("<ul></ul>");

				data.data.forEach((item) => {
					$ul.append(renderGood(item));
				});

				$container.append($ul);
			});

			function renderGood(good){
				return $(`<li>
<a href="${good.clickUrl}" target="_blank">
	<div class="good-imgbox">
		<img src="${good.picUrl}">
	</div>
	<div class="good-texture">
		<p><strong class="good-title">${good.title}</strong></p>
	</div>
	<div class="good-priceinfo">
		<span class="crossline currency-rmb">${good.rawPrice}</span>
		<strong class="text-large prom-price currency-rmb">${good.promPrice}</strong>
	</div>
</a>
</li>`);
			}
		});

	</script>

</div>


<script>
$('.PhotoBox img').hover(
	function(){
		$(this).animate({"width":"150%"},300);
	},
	function(){
		$(this).animate({"width":"100%"},300);
	}
);
</script>




<!-- 分享海报二维码宣传推广图片 -->
{include file="$haibao" /}
{include file="../../../haibao_style/btn" /}
<!--<div style="position:fixed;right:30px;top:80px;z-index:200;width:30px;font-size:10px;line-height:10px;color:#000;opacity:0.7;"><i id="share_code" onclick="share_btn()" style="font-size:30px;" class="fa fa-qrcode"></i>海报</div>-->


<!-- 微信分享 -->
{include file="index@share"/}

{/block}